'''
Created on Oct 28, 2010

@author: Nguyen Van Linh
'''
from datetime import datetime as dtime
class Note( object ):
  '''
  Note class
  '''
  '''
  Constructor of class
  @param id: id of note
  @param createTime: creation time of note
  @param title: title of note
  @param content: content of note
  '''
  def __init__( self, id = 0, category = None, title = '', content = '', createTime = dtime.now(), modifyTime = dtime.now(), rate = 0, readCount = 0, status = 0 ):
    '''
    Constructor
    '''
    self.id = id
    self.createTime = createTime
    self.title = title
    self.content = content
    self.modifyTime = modifyTime
    self.rate = rate
    self.readCount = readCount
    self.status = status
    self.category = category

  def get_category( self ):
    return self.__category


  def set_category( self, value ):
    self.__category = value


  def del_category( self ):
    del self.__category


  def get_id( self ):
    return self.__id


  def get_create_time( self ):
    return self.__createTime


  def get_title( self ):
    return self.__title


  def get_content( self ):
    return self.__content


  def get_modify_time( self ):
    return self.__modifyTime


  def get_rate( self ):
    return self.__rate


  def get_read_count( self ):
    return self.__readCount


  def get_status( self ):
    return self.__status


  def set_id( self, value ):
    self.__id = value


  def set_create_time( self, value ):
    self.__createTime = value


  def set_title( self, value ):
    self.__title = value


  def set_content( self, value ):
    self.__content = value


  def set_modify_time( self, value ):
    self.__modifyTime = value


  def set_rate( self, value ):
    self.__rate = value


  def set_read_count( self, value ):
    self.__readCount = value


  def set_status( self, value ):
    self.__status = value


  def del_id( self ):
    del self.__id


  def del_create_time( self ):
    del self.__createTime


  def del_title( self ):
    del self.__title


  def del_content( self ):
    del self.__content


  def del_modify_time( self ):
    del self.__modifyTime


  def del_rate( self ):
    del self.__rate


  def del_read_count( self ):
    del self.__readCount


  def del_status( self ):
    del self.__status

  def __str__( self ):
    return self.get_title()
  id = property( get_id, set_id, del_id, "id's docstring" )
  createTime = property( get_create_time, set_create_time, del_create_time, "createTime's docstring" )
  title = property( get_title, set_title, del_title, "title's docstring" )
  content = property( get_content, set_content, del_content, "content's docstring" )
  modifyTime = property( get_modify_time, set_modify_time, del_modify_time, "modifyTime's docstring" )
  rate = property( get_rate, set_rate, del_rate, "rate's docstring" )
  readCount = property( get_read_count, set_read_count, del_read_count, "readCount's docstring" )
  status = property( get_status, set_status, del_status, "status's docstring" )
  category = property( get_category, set_category, del_category, "category's docstring" )



